package com.team.runsfast.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@TableName("t_couponinfo")
@NoArgsConstructor
public class CouponInfo {
    @TableId(type = IdType.AUTO)
    private Long id;
    /**优惠券ID*/
    private Long coupid;
    /**用户ID*/
    private Long uid;
    /**创建时间*/
    private Date ctime;
    /**1.使用  2.未使用*/
    private Integer flag;

    public CouponInfo(Long coupid, Long uid) {
        this.coupid = coupid;
        this.uid = uid;
        this.ctime = new Date();
        this.flag = 1;
    }
}
